package com.alinesno.cloud.initializr.starter.cicd.deploy.k8s.api;

import com.alinesno.cloud.initializr.starter.cicd.deploy.k8s.BaseApi;
import com.alinesno.cloud.initializr.starter.cicd.deploy.k8s.bean.CredentialsBean;

import io.fabric8.kubernetes.client.Config;
import io.fabric8.kubernetes.client.ConfigBuilder;

/**
 * 认证服务
 * @author WeiXiaoJin
 * @since 2021年6月26日 下午10:13:51
 */
public class CredentialsApi extends BaseApi {

//	kubectl create secret -n test docker-registry docker-login --docker-server=http://registry-vpc.cn-shenzhen.aliyuncs.com --docker-username=luoandon@gmail.com --docker-password=1234qwer

	final ConfigBuilder configBuilder = new ConfigBuilder();
	
	@SuppressWarnings("unused")
	public void createCredentials(CredentialsBean bean) {
	
		Config config = configBuilder
		          .withTrustCerts(true)
		          .withUsername("developer")
		          .withPassword("developer")
		          .withNamespace("myproject")
		          .build();
		
	}
	
}
